<!DOCTYPE html>

































































<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>Android Developers</title>
<link href="/assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
<script src="/assets/search_autocomplete.js" type="text/javascript"></script>
<script src="/assets/jquery-resizable.min.js" type="text/javascript"></script>
<script src="/assets/android-developer-docs.js" type="text/javascript"></script>
<script src="/assets/prettify.js" type="text/javascript"></script>
<script type="text/javascript">
  setToRoot("/");
</script>
<noscript>
  <style type="text/css">
    html,body{overflow:auto;}
    #body-content{position:relative; top:0;}
    #doc-content{overflow:visible;border-left:3px solid #666;}
    #side-nav{padding:0;}
    #side-nav .toggle-list ul {display:block;}
    #resize-packages-nav{border-bottom:3px solid #666;}
  </style>
</noscript>
</head>
<body class="gc-documentation">
<a name="top"></a>

  <div id="header">
      <div id="headerLeft">
          <a href="/index.html" tabindex="-1"><img
              src="/assets/images/bg_logo.png" alt="Android Developers" /></a>
          <ul id="header-tabs" class="home">
    
	<li id="home-link"><a href="/index.html">
	
		<span class="en">Home</span>
		<span style="display:none" class="de">Startseite</span>
		<span style="display:none" class="es"></span>
		<span style="display:none" class="fr"></span>
		<span style="display:none" class="it"></span>
		<span style="display:none" class="ja">ホーム</span>
		<span style="display:none" class="zh-CN">主页</span>
		<span style="display:none" class="zh-TW">首頁</span>
	
	</a></li>
	<li id="sdk-link"><a href="/sdk/index.html">
		<span class="en">SDK</span>
	</a></li>
	<li id="guide-link"><a href="/guide/index.html" onClick="return loadLast('guide')">
	
		<span class="en">Dev Guide</span>
		<span style="display:none" class="de">Handbuch</span>
		<span style="display:none" class="es">Guía</span>
		<span style="display:none" class="fr">Guide</span>
		<span style="display:none" class="it">Guida</span>
		<span style="display:none" class="ja">開発ガイド</span>
		<span style="display:none" class="zh-CN">开发人员指南</span>
		<span style="display:none" class="zh-TW">開發指南</span>
	
	</a></li>
	<li id="reference-link"><a href="/reference/packages.html" onClick="return loadLast('reference')">
	
		<span class="en">Reference</span>
		<span style="display:none" class="de">Referenz</span>
		<span style="display:none" class="es">Referencia</span>
		<span style="display:none" class="fr">Référence</span>
		<span style="display:none" class="it">Riferimento</span>
		<span style="display:none" class="ja">リファレンス</span>
		<span style="display:none" class="zh-CN">参考</span>
		<span style="display:none" class="zh-TW">參考資料</span>
	
	</a></li>
	<li id="resources-link"><a href="/resources/index.html" onClick="return loadLast('resources')">
	
		<span class="en">Resources</span>
		<span style="display:none" class="de"></span>
		<span style="display:none" class="es"></span>
		<span style="display:none" class="fr"></span>
		<span style="display:none" class="it"></span>
    		<span style="display:none" class="ja"></span>
		<span style="display:none" class="zh-CN"></span>
		<span style="display:none" class="zh-TW"></span>
	
	</a></li>
	<li id="videos-link"><a href="/videos/index.html" onClick="return loadLast('videos')">
	
		<span class="en">Videos</span>
		<span style="display:none" class="de"></span>
		<span style="display:none" class="es"></span>
		<span style="display:none" class="fr"></span>
		<span style="display:none" class="it"></span>
		<span style="display:none" class="ja">ビデオ</span>
		<span style="display:none" class="zh-CN"></span>
		<span style="display:none" class="zh-TW"></span>
	
	</a></li>
	<li><a href="http://android-developers.blogspot.com" onClick="return requestAppendHL(this.href)">
	
		<span class="en">Blog</span>
		<span style="display:none" class="de"></span>
		<span style="display:none" class="es"></span>
		<span style="display:none" class="fr"></span>
		<span style="display:none" class="it"></span>
		<span style="display:none" class="ja">ブログ</span>
		<span style="display:none" class="zh-CN">博客</span>
		<span style="display:none" class="zh-TW">網誌</span>
	
	</a></li>


     
</ul>
     
      </div>
      <div id="headerRight">
          <div id="headerLinks">
          
            <img src="/assets/images/icon_world.jpg" alt="Language:" /> 
            <span id="language">
             	<select name="language" onChange="changeLangPref(this.value, true)">
          			<option value="en">English&nbsp;&nbsp;&nbsp;</option>
          			<option value="ja">日本語</option>
          			
             	</select>	
             	<script type="text/javascript">
             	  <!--  
                  loadLangPref();  
             	   //-->
             	</script>
            </span>
          
          <a href="http://www.android.com">Android.com</a>
          </div>
  <div id="search" >
      <div id="searchForm">
          <form accept-charset="utf-8" class="gsc-search-box" 
                onsubmit="return submit_search()">
            <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody>
                <tr>
                  <td class="gsc-input">
                    <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off"
                      title="search developer docs" name="q"
                      value="search developer docs"
                      onFocus="search_focus_changed(this, true)"
                      onBlur="search_focus_changed(this, false)"
                      onkeydown="return search_changed(event, true, '/')"
                      onkeyup="return search_changed(event, false, '/')" />
                  <div id="search_filtered_div" class="no-display">
                      <table id="search_filtered" cellspacing=0>
                      </table>
                  </div>
                  </td>
                  <td class="gsc-search-button">
                    <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" />
                  </td>
                  <td class="gsc-clear-button">
                    <div title="clear results" class="gsc-clear-button">&nbsp;</div>
                  </td>
                </tr></tbody>
              </table>
          </form>
      </div><!-- searchForm -->
  </div><!-- search -->
      </div><!-- headerRight -->
      <script type="text/javascript">
        <!--  
        changeTabLang(getLangPref());
        //-->
      </script>
  </div><!-- header -->

<div id="body-content">
<div id="doc-content" style="position:relative;">

<div id="mainBodyFixed">
              <div id="mainBodyLeft">			
                    <div id="homeMiddle">
                        <div id="topAnnouncement">
                            <div id="homeTitle">
                                <h2>Developer Announcements</h2>
                            </div><!-- end homeTitle -->
                            <div id="announcement-block">
                            <!-- total max width is 520px -->
                                  <img src="/assets/images/home/IO-logo-2011.png"
alt="Android at Google IO 2011" width="200px"
style="padding-left:22px;padding-bottom:15px;padding-top:15px;"/>
                                  <div id="announcement" style="width:275px">
    <p>Google I/O is a two-day developer event that will take place May 10-11 at Moscone Center, San
Francisco. The agenda includes several sessions about Android, presented by Android engineers and
other team members.</p><p><a href="http://www.google.com/events/io/2011/sessions.html">Learn
more &raquo;</a></p>
                                </div> <!-- end annoucement -->
                            </div> <!-- end annoucement-block -->
                        </div><!-- end topAnnouncement -->
                        <div id="carouselMain" style="height:205px"> <!-- this height can be
                                                            adjusted based on the content height -->
                        </div>
                            <div class="clearer"></div>
                        <div id="carouselWheel">
                            <div class="app-list-container" align="center"> 
                                <a href="javascript:{}" id="arrow-left" onclick="" class="arrow-left-off"></a>
                                <div id="list-clip">
                                    <div style="left: 0px;" id="app-list">
                                      <!-- populated by buildCarousel() -->
                                    </div>
                                </div><!-- end list-clip -->
                                <a href="javascript:{ page_right(); }" id="arrow-right" onclick="" class="arrow-right-on"></a>
                                <div class="clearer"></div>
                            </div><!-- end app-list container -->
                        </div><!-- end carouselWheel -->
                    </div><!-- end homeMiddle -->

                    <div style="clear:both">&nbsp;</div>
              </div><!-- end mainBodyLeft -->

              <div id="mainBodyRight">
                      <table id="rightColumn">
                              <tr>
                                      <td class="imageCell"><a href="/sdk/index.html"><img src="/assets/images/icon_download.jpg" style="padding:0" /></a></td>
                                      <td>
                                              <h2 class="green">Download</h2>
                                              <p>The Android SDK has the tools, sample code, and docs you need to create great apps.</p>
                                              <p><a href="/sdk/index.html">Learn more &raquo;</a></p>
                                      </td>
                              </tr>
                              <tr>
                                      <td colspan="2"><div class="seperator">&nbsp;</div></td>
                              </tr>
                              <tr>
                                      <td class="imageCell"><a href="http://www.android.com/market.html"><img src="/assets/images/icon_market.jpg" style="padding:0" /></a></td>
                                      <td>
                                              <h2 class="green">Publish</h2>
                                              <p>Android Market is an open service that lets you distribute your apps to handsets.</p>
                                              <p><a href="http://market.android.com/publish">Learn more &raquo;</a></p>
                                      </td>
                              </tr>
                              <tr>
                                      <td colspan="2"><div class="seperator">&nbsp;</div></td>
                              </tr>
                              <tr>
                                      <td class="imageCell"><a href="http://source.android.com"><img src="/assets/images/icon_contribute.jpg" style="padding:0" /></a></td>
                                      <td>
                                              <h2 class="green">Contribute</h2>
                                              <p>Android Open Source Project gives you access to the entire platform source.</p>
                                              <p><a href="http://source.android.com">Learn more &raquo;</a></p>
                                      </td>
                              </tr>
                              <tr>
                                      <td colspan="2"><div class="seperator">&nbsp;</div></td>
                              </tr>
                              <tr>
                                      <td class="imageCell"><a
href="/resources/dashboard/platform-versions.html"><img
src="/images/icon_dashboard.png" style="padding:0" /></a></td>
                                      <td>
                                              <h2 class="green">Target Devices</h2>
                                              <p>The Device Dashboard
provides information about deployed Android devices to
help you target suitable device configurations as you build and update your
apps.</p>
                                              <p><a
href="/resources/dashboard/platform-versions.html">Learn more &raquo;</a></p>
                                      </td>
                              </tr>

                      </table>
              </div>
	</div>

<!--[if lte IE 6]>
  <style>
    #arrow-left {
      margin:0 0 0 5px;
    }
    #arrow-right {
      margin-left:0;
    }
    .app-list-container {
      margin: 37px 0 0 23px;
    }
    div#list-clip { 
      width:468px;
    }
  </style>
<![endif]-->

<script type="text/javascript">

// * -- carousel dictionary -- * //
  /* layout:  imgLeft, imgRight, imgTop
     icon:    image for carousel entry. cropped (height:70px, width:90px)
     name:    string for carousel entry
     img:     image for bulletin post. cropped (height: 170, width:230px)
     title:   header for bulletin (optional, insert "" value to skip
     desc:    the bulletin post. must include html tags. 
  */

  var droidList = {
    'sdk': {
      'layout':"imgLeft",
      'icon':"sdk-small.png",
      'name':"Android 3.0",
      'img':"honeycomb-android.png",
      'title':"Android 3.0 is here!",
      'desc': "<p>Android 3.0 is now available for the Android SDK. It offers a redesigned UI and "
+ "all new developer APIs for an optimized experience on tablets and similar devices. "
+ "For more information about what's in Android 3.0, read the "
+ "<a href='/sdk/android-3.0.html'>version notes</a>.</p>"
+ "<p>If you have an existing SDK, add Android 3.0 as an "
+ "<a href='/sdk/adding-components.html'>SDK "
+ "component</a>. If you're new to Android, install the "
+ "<a href='/sdk/index.html'>SDK starter package</a>."
    },

    'tv': {
      'layout':"imgLeft",
      'icon':"tv_s.png",
      'name':"Google TV",
      'img':"tv_l.png",
      'title':"Announcing Google TV!",
      'desc': "<p><a href='http://www.google.com/tv/'>Google TV</a> is a new platform "
               + "for television built on Android. Google "
               + "has partnered with Sony and Logitech to integrate "
               + "this platform into TVs, blu-ray players, and companion "
               + "boxes. An add-on for the Android SDK will be "
               + "available early next year. </p>"
               + "<p><a href='http://www.google.com/tv/'>Learn more about "
               + "Google TV &raquo;</a></p>"
    },

    'devphone': {
      'layout':"imgLeft",
      'icon':"devphone-small.png",
      'name':"Dev Phones",
      'img':"devphone-large.png",
      'title':"Android Dev Phones",
      'desc': "<p>Run and debug your Android applications directly on one of these "
 + "devices. Modify and rebuild the Android operating system, and flash it onto "
 + "the phone. The Android Dev Phones are carrier-independent, and available for "
 + "purchase by developers through their Android Market publisher accounts.</p><p> "
 + "<a href='http://market.android.com/publish'>Visit Android Market "
 + "to learn more &raquo;</a></p>"
    },

    'mapskey': {
      'layout':"imgLeft",
      'icon':"maps-small.png",
      'name':"Maps API Key",
      'img':"maps-large.png",
      'title':"Maps API Key",
      'desc':"<p>If you're writing an Android application that uses Google Maps (with MapView), you must register your application to obtain a Maps API Key. Without the key, your maps application will not work on Android devices. Obtaining a key requires just a couple of steps.</p><p><a href='http://code.google.com/android/add-ons/google-apis/maps-overview.html'>Learn more &raquo;</a></p>"
    }

  }
</script>
<script type="text/javascript" src="/assets/carousel.js"></script>
<script type="text/javascript">
  initCarousel("sdk");
</script>


<div id="footer">


  <div id="copyright">
    
  Except as noted, this content is 
  licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
  Creative Commons Attribution 2.5</a>. For details and 
  restrictions, see the <a href="/license.html">Content 
  License</a>.
  </div>

  <div id="footerlinks">
    
  <p>
    <a href="http://www.android.com/terms.html">Site Terms of Service</a> -
    <a href="http://www.android.com/privacy.html">Privacy Policy</a> -
    <a href="http://www.android.com/branding.html">Brand Guidelines</a>
  </p>
  </div>

</div> <!-- end footer -->

</div><!-- end doc-content -->

</div> <!-- end body-content --> 

<script type="text/javascript">
init(); /* initialize android-developer-docs.js */
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5831155-1");
pageTracker._trackPageview();
</script>

</body>
</html>



